<template>
    <div>
       <div class="art-title">
          <div class="art-header">
            <div class="art-bg-img" :style="{background:'url('+avatar_s500+') no-repeat center center/cover'}"></div>
            <div class="art-mask"></div>
            <div class="art-content">
              <div class="pic">
                <img :src="avatar_s500" alt="">
              </div>
              <h2>{{name}}</h2>
            </div>
          </div>

       </div>
      <div class="art-list">
        <ul>
          <router-link tag="li" v-for="(item,index) in songlist" :key="index" :to="{name:'musicPlay',params:{songId:item.song_id}}">

            <div class="left">
              <img :src="item.pic_big" alt="">
            </div>
            <div class="right">
              <div class="name">
                {{item.title}}
              </div>
              <div class="adress">
                 {{item.si_proxycompany}}
              </div>
            </div>
            <i class="iconfont icon-you1"></i>
          </router-link>
        </ul>
      </div>
    </div>
</template>

<script>
    export default {
        name: "artDetail",
        data(){
          return{
            ting_uid:this.$route.params.ting_uid,
            name:this.$route.params.name,
            avatar_s500:this.$route.params.avatar_s500,
            songlist:[]
          }
        },
        created(){
          const url = this.host + '/v1/restserver/ting?method=baidu.ting.artist.getSongList&tinguid='+this.ting_uid+'&limits=10&use_cluster=1&order=2';
          this.$axios.get(url).then(res=>{
               this.songlist = res.data.songlist
              }).catch(err=>{

          })
        }
    }
</script>

<style scoped lang="less">
  .art-header{
    width: 100%;
    height: 160px;
    position: relative;
    .art-bg-img{
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      z-index: -2;
    }
    .art-mask{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: hsla(0,0%,100%,.85);
      overflow: hidden;
      z-index:-1
    }
    .art-content{
      padding:25px 0px;
      text-align: center;
      img{
        width: 80px;
        border-radius: 50px;
      }
      h2{
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center;
        font-size:15px;
        line-height: 20px;
        margin-top: 12px;
        color: #333;
        font-weight: 400;
      }
    }
  }
  .art-list{
    ul {
      li{
        position: relative;
        border-bottom: 1px solid #f3f3f3;
        padding: 8px 15px;
        display: flex;
        align-items: center;
        .left{
          margin-right: 10px;
           img{
             width: 54px;
           }
        }
        .right{
          flex: 0 0 65%;
          width: 65%;

          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          .name{
            color: #333;
            font-size: 14px;
          }
          .adress{
            font-size: 12px;
            color: #999;
            padding-top: 6px;
          }
        }
        .icon-you1{
          position: absolute;
          right: 10px;
          top: 50%;
          transform: translateY(-50%);
          font-size: 20px;
          color: #999;
        }
      }
    }
  }
</style>
